console.log('我是js中的代码');

function sum(n) {
    var result = 0;
    for (var i = 0; i <= n; i++) {
        result += i;
    }
    return result;
}

var ret = sum(100);

console.log(ret);



function subSum(n) {
    var result = 0;
    for (var i = 0; i <= n; i++) {
        result += i;
    }
    return result;
}

console.log(subSum(10));